export interface IResponseType<T> {
  status: number;
  msg: string;
  data: T | null;
  success: boolean;
}

export const responseResult = <T>({
  data = null,
  msg = '请求成功',
  status = 200,
  success = true,
}: Partial<IResponseType<T>>): IResponseType<T> => {
  return {
    status,
    msg,
    data,
    success,
  };
};
